//  -------------------- iSharePoint -------------------- //
// 
//  Company:	IT Complex, LLC
//  Project:	Smart.Workflow
//  File name:	ActionRuleInstanceList.cs
//  Developer:	Solomatov Igor
//  Created:	16.04.2012
// 
//  -------------------- iSharePoint -------------------- //

using System;
using System.Collections.Generic;
using System.Linq;

namespace Smart.Workflow
{
	/// <summary>
	/// ActionRule instances
	/// </summary>
	[Serializable]
	public class ActionRuleInstanceList : List<ActionRuleInstance>
	{
		/// <summary>
		/// ActionRule instances
		/// </summary>
		public ActionRuleInstanceList()
		{
		}

		/// <summary>
		/// ActionRule instances
		/// </summary>
		public ActionRuleInstanceList(int capacity)
			: base(capacity)
		{
		}

		/// <summary>
		/// ActionRule instances
		/// </summary>
		public ActionRuleInstanceList(IEnumerable<ActionRuleInstance> collection)
			: base(collection)
		{
		}

		/// <summary>
		/// ActionRule instances
		/// </summary>
		public ActionRuleInstanceList(ActivityInstance parent, IEnumerable<ActionRule> collection)
			: base(collection.Select(rule => new ActionRuleInstance(parent, rule)))
		{
		}
	}
}